package zhihui.mobile.ui.express;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import zhihui.mobile.R;
import zhihui.mobile.bean.express.ExpressBeanListV2;

/**
 * Created by Administrator on 2017/5/6 0006.
 */

public class ExpressOrderAdapter extends BaseQuickAdapter<ExpressBeanListV2.DataBean.InnerBean, BaseViewHolder> {

    private Context context;

    public ExpressOrderAdapter(List data, Context context) {
        super(R.layout.item_express_order, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, ExpressBeanListV2.DataBean.InnerBean item) {
        if (item.getEname_f() == null || item.getEname_f().isEmpty()) {
            helper.setText(R.id.item_express_order_content_tv, "智慧妈妈包裹  快递单号： " + item.getId_f());
        } else {
            helper.setText(R.id.item_express_order_content_tv, item.getEname_f() + "包裹  快递单号： " + item.getId_f());
        }
    }
}
